package by.qizer.supercamp.service;

import by.qizer.supercamp.dao.GuardDAO;
import by.qizer.supercamp.dao.OwnerDAO;
import by.qizer.supercamp.domain.Guard;
import by.qizer.supercamp.domain.Owner;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author Pribytkoyski Alexey
 *         User: qizer
 *         Date: 04.04.12
 */

@Service
public class GuardServiceImpl implements GuardService {

    @Autowired
    private GuardDAO guardDAO;

    @Transactional
    public void addGuard(Guard guard) {
        guardDAO.addGuard(guard);
    }

    @Transactional
    public List<Guard> listGuards() {
        return guardDAO.listGuards();
    }

    @Transactional
    public void removeGuard(Integer id) {
        guardDAO.removeGuard(id);
    }
}
